package com.telit.firecommand.dao;

import com.telit.firecommand.entity.FireReportSuperiorLog;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface FireReportSuperiorLogDao {
    int deleteByPrimaryKey(Long id);

    int insert(FireReportSuperiorLog record);

    int insertSelective(FireReportSuperiorLog record);

    FireReportSuperiorLog selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(FireReportSuperiorLog record);

    int updateByPrimaryKey(FireReportSuperiorLog record);

    /**
     * 通过火情id查询
     * @param fireId
     * @param status
     * @return
     */
    FireReportSuperiorLog queryByFireId(@Param("fireId") Long fireId, @Param("status")int status);

    /**
     * 查询火情是否已上报
     * @param fireId
     * @return
     */
    Long queryHasReport(@Param("fireId")Long fireId);
}